<template>
</template>
<script>

  import request from '@/common/js/request'

  export default {
    name: "user-check-componet",
   data() {
      return {

      }
    },
    created: function () {
      let _username = localStorage.getItem('username')

      // console.log('router',this.$route.path)
//      console.log('1_username',_username)
      if(!_username){
        //需要重新登录

        this.$router.push({path: '/login',query:{
          redirect:encodeURIComponent(this.$route.path)
          }})
        return
        // this.$wlsUtil.linkToPath('/login')
      }

      this.testCookies()
    },
    methods: {
      //测试cookies是否有效
      testCookies(){
        request.requestMenuList(res=>{

        })
      }
    }
  }

</script>

<style scoped>

</style>
